package org.nanotek;

import java.util.Date;

import org.nanotek.cms.domain.TemporalImaginary;
import org.nanotek.util.Base;

@SuppressWarnings({"serial" })
public  class PersistentKongee implements TemporalImaginary< Base<?> , StringKong > , Settable<Base<?>>{

                protected Kong<?> id;
                protected Kong<Kong<?>> it;
                protected Class<Base<?>> clazz;
                protected StringKong meKong;


                public static void main(String args[])
                {
                	PersistentKongee pk = new PersistentKongee();

                }
		        public PersistentKongee() {
		        	meKong = new StringKong(PersistentKongee.class.getName() + "|" + this.hashCode() + "|" + Long.toString(System.currentTimeMillis()));
		        	postConstruct(null);
		        }

		       public PersistentKongee(Kong<Kong<?>> kong) {
		              this();
		    	      this.it = kong;
		        }

		       private void postConstruct()
		       {
		    	   it = (Kong<Kong<?>>) new DateBase(new Date(System.currentTimeMillis()));
		       }

		       private void postConstruct(Kong<Kong<?>> kong)
		       {
		    		   it = kong;
		       }
		       
		       
		       public Kong<?> setId(final Kong<?> kong) {
                        return this.id = kong;
               }

                @Override
                public Kong<?> getId() {
                        return id;
                }

                @Override
                public Class<Base<?>> getClazz() {
                        return clazz;
                }

                public void setClazz(final Class<Base<?>> clazz) {
                        this.clazz = clazz;
                }

                @Override
                public Base<?> getInstance() {
                        return this;
                }

				@Override
				public Kong<?> get() {
					return it;
				}

				@Override
				public StringKong getTemporalImaginary(Kong<Kong<?>> kong) {
					return meKong;
				}
}
